package cn.silver.module.message.bean;

import cn.silver.framework.core.utils.DateUtils;
import cn.silver.framework.mybatis.bean.BaseBean;
import cn.silver.module.message.domain.MsgCaptcha;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * @author zhouxiaobo
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MsgCaptcha.class)
@Schema(name = "CaptchaBean", title = "消息管理-验证码消息对象")
public class CaptchaBean extends BaseBean implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 消息编号
     */
    @Schema(title = "消息编号")
    private String code;
    /**
     * 验证码
     */
    @Schema(title = "验证码")
    private String value;
    /**
     * 发送渠道
     */
    @Schema(title = "发送渠道")
    private String channel;
    /**
     * 接收账号
     */
    @Schema(title = "接收账号")
    private String account;
    /**
     * 消息内容
     */
    @Schema(title = "消息内容")
    private String content;
    @Schema(title = "发送时间")
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    private Date sendTime;
    /**
     * 过期时间
     */
    @Schema(title = "过期时间")
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    private Date deadline;
}
